<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateQiiArticleTypeFacilitiesTable extends Migration
{
    /**
     * Schema table name to migrate
     * @var string
     */
    public $set_schema_table = 'qii_article_type_facilities';

    /**
     * Run the migrations.
     * @table qii_article_type_facilities
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasTable($this->set_schema_table)) return;
        Schema::create($this->set_schema_table, function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->increments('id')->comment('文章ID');
            $table->string('alias', 20)->default('')->comment('文章别名 (可代替ID进行URL的优化)');
            $table->string('title')->default('')->comment('文章名称');
            $table->string('title2')->default('')->comment('文章名称');
            $table->string('title3')->default('')->comment('文章名称');
            $table->string('title4')->default('')->comment('文章名称');
            $table->string('title5')->default('')->comment('文章名称');
            $table->string('title6')->default('')->comment('文章名称');
            $table->longText('content')->comment('文章内容');
            $table->longText('content2')->comment('文章内容');
            $table->longText('content3')->comment('文章内容');
            $table->longText('content4')->comment('文章内容');
            $table->longText('content5')->comment('文章内容');
            $table->string('litpic', 200)->default('')->comment('选文章缩略图');
            $table->string('litpic2', 200)->default('')->comment('列表缩略图');
            $table->string('litpic3', 200)->default('')->comment('选文章缩略图');
            $table->string('litpic4', 200)->default('')->comment('选文章缩略图');
            $table->string('litpic5', 200)->default('')->comment('选文章缩略图');
            $table->string('litpic6', 200)->default('')->comment('选文章缩略图');
            $table->string('litpic7', 200)->default('')->comment('选文章缩略图');
            $table->string('litpic8', 200)->default('')->comment('选文章缩略图');
            $table->string('litpic9', 200)->default('')->comment('选文章缩略图');
            $table->string('litpic10', 200)->default('')->comment('选文章缩略图');
            $table->string('litpic11', 200)->default('')->comment('选文章缩略图');
            $table->text('banners')->comment('相册');
            $table->string('banners2', 200)->default('')->comment('选文章缩略图');
            $table->text('banners3')->comment('相册');
            $table->string('banners4', 200)->default('')->comment('选文章缩略图');
            $table->text('banners5')->comment('相册');
            $table->string('banners6', 200)->default('')->comment('选文章缩略图');
            $table->text('banners7')->comment('相册');
            $table->string('banners8', 200)->default('')->comment('选文章缩略图');
            $table->text('banners9')->comment('相册');
            $table->string('banners10', 200)->default('')->comment('选文章缩略图');
            $table->string('litpic_title')->default('')->comment('缩略图标题');
            $table->string('litpic_alt')->default('')->comment('缩略图alt');
            $table->string('banners2_title')->default('')->comment('缩略图标题');
            $table->string('banners2_alt')->default('')->comment('缩略图alt');
            $table->string('banners3_title')->default('')->comment('缩略图标题');
            $table->string('banners3_alt')->default('')->comment('缩略图alt');
            $table->string('banners4_title')->default('')->comment('缩略图标题');
            $table->string('banners4_alt')->default('')->comment('缩略图alt');
            $table->string('banners5_title')->default('')->comment('缩略图标题');
            $table->string('banners5_alt')->default('')->comment('缩略图alt');
            $table->string('banners6_title')->default('')->comment('缩略图标题');
            $table->string('banners6_alt')->default('')->comment('缩略图alt');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
     public function down()
     {
       Schema::dropIfExists($this->set_schema_table);
     }
}
